{% load url from future %}<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="{{ LANGUAGE_CODE|default:"en-us" }}" xml:lang="{{ LANGUAGE_CODE|default:"en-us" }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>
<head>
<link REL="SHORTCUT ICON" HREF="{{ STATIC_URL }}img/favicon.ico">  
<script type="text/javascript" src="{% load adminmedia %}{% admin_media_prefix %}flowplayer-3.2.6.min.js"></script>
<script type="text/javascript" src="{% load adminmedia %}{% admin_media_prefix %}expand.js"></script>
<title>{% block title %}{% endblock %}</title>
<script type="text/javascript">
 function confirmReset()
 {
 if (confirm("Are you sure you want to delete your saved progress?"))
   {
   window.location = "{% url 'reset' %}"
   }
 }
 function confirmLogout()
 {
 if (confirm("Are you sure you want to log out?"))
   {
   window.location = "{% url 'logout' %}?next={{request.path}}"
   }
 }
 </script>
<link rel="stylesheet" type="text/css" href="{% block stylesheet %}{% load adminmedia %}{{ STATIC_URL }}/css/base.css{% endblock %}" />
{% block extrastyle %}{% endblock %}
{% if LANGUAGE_BIDI %}<link rel="stylesheet" type="text/css" href="{% block stylesheet_rtl %}{% admin_media_prefix %}css/rtl.css{% endblock %}" />{% endif %}
<script type="text/javascript">window.__admin_media_prefix__ = "{% filter escapejs %}{% admin_media_prefix %}{% endfilter %}";</script>
{% block extrahead %}{% endblock %}
{% block blockbots %}<meta name="robots" content="NONE,NOARCHIVE" />{% endblock %}
</head>
{% load i18n %}

<body class="{% if is_popup %}popup {% endif %}{% block bodyclass %}{% endblock %}">

<!-- Container -->
<div id="container">

    {% if not is_popup %}
    <!-- Header -->
    <div id="header">
        <div id="branding">
        <h1 id="site-name"><a href="{% url 'index' %}"><img src="{{ STATIC_URL }}img/header1.png"></a></h1>
        </div>

        <div id="user-tools">
        {% if user.is_authenticated %}
            {% if user.is_staff %}
                <a href="{% url 'admin:index' %}">Admin</a> |
            {% endif %}
            <a href="{% url 'account' %}?next={{request.path}}">Account</a> |
            <a href="javascript:confirmReset()">Reset</a> |
            <a href="javascript:confirmLogout()">Log out</a>
            <br>{% trans 'You are logged in as ' %}
            <strong>{% filter force_escape %}{% firstof user.first_name user.username %}{% endfilter %}</strong>
        {% else %}
            <a href="{% url 'login'  %}?next={{request.path}}">Log in</a> |
            <a href="{% url 'register'  %}?next={{request.path}}">Register</a>
        {% endif %}
        </div>
        
    </div>
    <!-- END Header -->
    {% endif %}

        {% if messages %}
        <ul class="messagelist">{% for message in messages %}
          <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
	{% endfor %}</ul>
        {% endif %}

    <!-- Content -->
    <div id="content">
    <div id="content-main" class="{% block coltype %}colM{% endblock %}">
        {% block content %}
        {{ content }}
        {% endblock %}
        <br class="clear" />
    </div>
    <div id="content-related">
    {% block sidebar %}{% endblock %}
    </div>
    </div>
    <!-- END Content -->

    {% block footer %}<div id="footer"></div>{% endblock %}
</div>
<!-- END Container -->

</body>
</html>
